package com.cg.controller;

import com.cg.client.AppClient;
import com.cg.dto.Result;
import com.cg.entity.Dictionary;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * @Description 数据字典表
 * @Author CG
 * @Date 2024/1/3 16:46
 **/
@RestController
@RequestMapping("/dictionary")
public class DictionaryController {

    @Resource
    private AppClient appClient;

    /**
     * 根据type_code查询所有类型
     */
    @GetMapping("/queryDictionaryByTypeCode")
    public Result<List<Dictionary>> queryDictionaryByTypeCode(String typeCode){
        return appClient.queryDictionaryByTypeCode(typeCode);
    }
}
